#include <stdio.h>

int main(int argc, char **argv)
{
    printf("hello world\n");
    fprintf(stdout, "hello world\n");
    fprintf(stderr, "hello world\n");

    // 打开文件
    FILE *fp = fopen("someints.txt", "r");
    if (fp == NULL)
    {
        printf("open file error\n");
        return -1;
    }

    int i, j;
    //
    int count = fscanf(fp, "%d%d", &i, &j);
    if (count != 2)
    {
        printf("read file error\n");
        return -1;
    }

    printf("%d %d\n", i, j);

    int closed = fclose(fp);
    if (closed != 0)
    {
        printf("close file error\n");
    }
}